<template>
	<view>
		<view class="wrapper">
			<view class="orderItem" v-for="(item, index) in orderTypes" :key="index" @click="goOrder(item.bizType)">
				<view class="leftContent">
					<image class="img" :src="item.img" mode=""></image>
					<text class="title">{{item.title}}</text>
				</view>
				<u-icon name="arrow-right" color="#333333"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderTypes:[
					{
						title : '短租订单',
						img: '../static/mine-order1.png',
						bizType : 1
					},
					{
						title : '长租订单',
						img: '../static/mine-order2.png',
						bizType : 2
					},
					// {
					// 	title : '分时租赁订单',
					// 	img: '../static/mine-order3.png'
					// },
					{
						title : '豪车订单',
						img: '../static/mine-order4.png',
						bizType : 3
					},
					// {
					// 	title : '婚庆用车订单',
					// 	img: '../static/mine-order5.png'
					// },
					{
						title : '活动订单',
						img: '../static/mine-order6.png',
						bizType : 100
					}
				],
			}
		},
		onLoad() {

		},
		methods: {
           goOrder(bizType) {
			   switch(bizType) {
				   case 1: //短租
				      uni.navigateTo({
				      	url:'./shortOrder/shortOrder-list?type=1'
				      })
				   break
				   case 2://长租
				     uni.navigateTo({
				     	url:'./longOrder/longOrder-list'
				     })
				   break
				   case 3://豪车
				      uni.navigateTo({
				      	url:'./shortOrder/shortOrder-list?type=3'
				      })
				   break
				   case 100://活动
				      uni.navigateTo({
				      	url:'../../pagesB/activity/activity-orderList'
				      })
				   break
			   }
		   }
		}
	}
</script>

<style lang="scss" scoped>
	.wrapper {
		margin: 28upx 20upx;
		border-radius: 16upx;
		background-color: $bg-white-color;
		padding: 20upx 44upx 0;
	}
	.orderItem {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 114upx;
		line-height: 114upx;
		border-bottom: 1px solid $liner-color;
		.leftContent {
			display: flex;
			align-items: center;
			.img {
				width: 72upx;
				height: 72upx;
			}
			.title {
				margin-left: 17upx;
				color: $text-color-33;
				font-size: 28upx;
				font-weight: bold;
			}
		}
		
	}
</style>
